<%--
  Created by IntelliJ IDEA.
  User: v
  Date: 17-3-22
  Time: 下午6:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% request.setCharacterEncoding("utf-8");%>
<html>
<head>
    <title>登录跳转</title>
</head>
<body>
<%
    String user=request.getParameter("user");
    String password=request.getParameter("pwd");

    System.out.println(user);
    System.out.println(password);
    if(session.getAttribute(user)==null){
        System.out.println(user);
        session.setAttribute(user,password);
        System.out.println(session.getAttribute(user));
        %>
        <jsp:forward page="newUser.jsp"/>
        <%
    }else if(!session.getAttribute(user).equals(password)) {
        %>
        <jsp:forward page="test1.jsp"/>
        <%
    }else {
        %>
        <jsp:forward page="welcomePage.jsp"/>
        <%
    }
%>
</body>
</html>